package com.example.mapper;

import com.example.entity.Customer;
import com.example.entity.Worker;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper

public interface CustomerMapper {
    @Select("select * from customer where username=#{username} and password=#{password}")
    Customer findByUsernamePassword(Customer customer);

    List<Customer> selectByPage(String name);

    void delete(List<Integer> ids);

    void updata(Customer customer);
    @Insert("insert into customer(username,customer_name, customer_sex, customer_phone) value(#{username},#{customerName},#{customerSex},#{customerPhone})")
    void add(Customer customer);
    @Select("select * from customer where customer_id=#{id}")
    Customer findById(Integer id);
}
